Public Class frmAuthenticateForm

    Private _key As String = "iwdkfw9wpcr2pqpf3pwrvzr"

    Friend ReadOnly Property key() As String
        Get
            Return _key
        End Get
    End Property

    Private Sub txtG1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtG1.TextChanged
        If txtG1.Text.Length = 6 Then txtG2.Focus()
    End Sub

    Private Sub txtG2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtG2.TextChanged
        If txtG2.Text.Length = 4 Then txtG3.Focus()
    End Sub

    Private Sub txtG3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtG3.TextChanged
        If txtG3.Text.Length = 4 Then txtG4.Focus()
    End Sub

    Private Sub txtG4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtG4.TextChanged
        If txtG4.Text.Length = 6 Then btnAuthenticate.Focus()
    End Sub

    Private Sub btnAuthenticate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAuthenticate.Click
        _key = txtG1.Text & "-" & txtG2.Text & "-" & txtG3.Text & "-" & txtG4.Text
        Me.Hide()
    End Sub

    Private Sub btnDemo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDemo.Click
        Me.Hide()
    End Sub
End Class